home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail-5.65c+IDA-1.4.4.1 / ida / cf / MAILERS < prev    next >
Encoding:
Internet Message Format  |  1991-06-04  |  6.1 KB

  1. To: Paul Pomes <Paul-Pomes@uiuc.edu>
  2. Subject: Here is some documentation on defining mailers.
  3. Date: Thu, 30 May 91 16:24:19 -0500
  4. From: Neil Rickert <rickert@cs.niu.edu>
  5.  
  6. The IDA configuration package comes with a standard set of mailers.  These
  7. may not solve all the mailer requirements of users.  This document is
  8. intended as a guide if you create your own mailer definition.
  9.  
  10. DEFINING A MAILER:
  11.  
  12.   The best way to start is to take an existing mailer and modify it to
  13. suit your purposes.  Start by changing the mailer name.  The P= operand
  14. defines the path to the program used.  The F= operand gives the mailer
  15. flags, documented in 'SENDMAIL INSTALLATION AND OPERATION GUIDE'.
  16. The S= and R= are the mailer specific rewrite rules, and you may need to
  17. give these some thought.  The A= gives the argument list passed to the
  18. mailer.
  19.  
  20.   To choose S= and R= operands, look for an existing mailer which creates
  21. addresses in the format desired, and use those rulesets.  The commentary
  22. on existing mailers toward the end of this document may help you in making
  23. this choice.
  24.  
  25. WHERE TO PLACE THE MAILER DEFINITION:
  26.  
  27.   If you are just adding an additional mailer, the easiest approach it to
  28. insert it at the end of your .m4 file, just after the 'include(Sendmail.mc)'.
  29. If you need to change existing mailers, see if the options
  30. UUCP_MAILER_DEF, LOCAL_MAILER_DEF and OTHER_MAILER_DEF (described in
  31. Sendmail.mc) are useful for this purpose.
  32.  
  33. COMMENTARY ON SOME EXISTING MAILERS:
  34.  
  35. Mlocal,    P=/bin/mail, F=DFMlrmns,    R=25/10, S=10, A=mail -d $u
  36.  
  37.  This is the standard definition of the BSD local mailer.  The local mailer
  38. is special, in that it normally only processes mail for local users on the
  39. system.  However any mail directed to the local mailer first goes through
  40. alias lookup and through .forward lookup.  The rewrite ruleset for
  41. envelope recipients, ruleset 25 in this case, is used to format addresses
  42. before the alias lookup.
  43.  
  44.  Ruleset 10 is designed to not append an '@local.domain.name' to local
  45. addresses, but to do little other reformatting.  It will affect the
  46. message headers and the envelope sender (the unix 'From ' line).  The
  47. actual recipient addresses sent to /bin/mail are just normal user ids.
  48. Ruleset 25 is there purely to handle the case where non-local aliasing is
  49. being used, so that these aliases will be consistently formatted before using
  50. to search the aliases database.
  51.  
  52.  Because of the 'r' flag, /bin/mail is actually called with the arguments
  53. list:  mail -d user1 user2 ....   (for local senders) or the list:
  54. mail -r sender -d user1 user2 ... (for non-local senders).
  55.  
  56. Mprog,    P=/bin/sh,  F=DFMhlsu, R=10, S=10, A=sh -c $u
  57.  
  58.  The prog mailer is used by sendmail for program mailers.  That is, if you
  59. have an alias for:  |"/usr/ucb/vacation me", it is processed by the prog
  60. mailer, after stripping of the leading '|'.  The result is that /bin/sh
  61. is called with arguments:  sh -c "/usr/ucb/vacation me".  The rewrite rulesets
  62. and flags of the prog mailer are also used for mailing to files.
  63.  
  64. MTCP,   P=[IPC], F=CDFMXhnmu, E=\r\n, R=10/11, S=11, A=IPC $h
  65.  
  66.  In the TCP mailer, we use ruleset 11 for most address rewriting.  Ruleset
  67. 11 formats addresses in the 'user@domain' format where possible.  If an
  68. address is from our uucp neighbor 'uucpnode', the address 'uucpnode!user'
  69. is transformed into the domain style 'uucpnode!user@our.domain.name'.
  70. Note however that this does not happen to the envelope recipient, which is
  71. processed instead by ruleset 10.  Since we might mail some UUCP addresses
  72. via TCP, we must be careful not to create a mailing loop by routing the
  73. direct envelope recipient through our domain.
  74.  
  75. MTCP-U, P=[IPC], F=CDFMXhnmu, E=\r\n, R=17/11, S=17/11, A=IPC $h
  76.  
  77.   The TCP-U mailer reformats header addresses with ruleset 11, just like the
  78. regular TCP mailer.  The envelope addresses, however, are in a format closer
  79. to UUCP bang paths, on the assumption that the receiving SMTP mailer will be
  80. forwarding them on the next step by UUCP transport.
  81.  
  82. MUUCP-A, P=/usr/bin/uux, F=DFMmu, S=15/11, R=15/11, A=uux - -z -r $h!rmail ($u)
  83.  
  84.   The UUCP-A mailer uses UUCP format envelope addresses to keep the UUCP
  85. UUCP transport software happy, but uses domain style header addresses.
  86.  
  87. MACSNET, P=/usr/spool/ACSnet/_lib/netmail, F=mDCFSMhun, R=10/11, S=11,
  88.     A=ACSmail -amailer -s$g -u$u -d$h -n$i
  89.  
  90.  The ACSNET mailer might be useful for users in Australia.  It could be used
  91. with a mailertable entry of:
  92.  
  93. ACSNET,%s.oz    .oz
  94.  
  95. so that addresses ending in '.oz' are sent via ACSNET.  (Taken from a user
  96. in Australia, but since I modified some of the arguments, please consider
  97. this only a guide - there are probably errors).  Note that the definition
  98. can extend to two lines if the second begins with white space.  The
  99. address rewrite rules are exactly the same as for the TCP mailer, since
  100. that already produces the appropriate address format.
  101.  
  102. Mdeliver, P=/usr/local/bin/deliver, F=DFMlrmnus, R=25/10, S=10, A=deliver $u
  103.  
  104.  This is intended for Chip Salzenberg's 'deliver' package.  You might have
  105. a mailertable definition something like:
  106.  
  107. deliver!localhost    deliver
  108.  
  109. so that an alias (or a user .forward) aliasing an address to 'name@deliver'
  110. will cause deliver to be invoked.  Note that the rewrite rulesets are
  111. identical to those used in the local mailer.
  112.  
  113. Mmailsh, P=/bin/sh, F=DFMhmus, R=11, S=11, A=sh /usr/lib/mailsh/$h.sh -r $g $u
  114.  
  115.  I am experimentally using this for shell scripts to handle mail problems such
  116. as gatewaying news to mail.  Since the hostname is significant, and becomes
  117. the name of the shell script to use, the 'l' (local) flag is not used.  Since
  118. I want to use this for news, I am using the same rewrite rulesets as the TCP
  119. mailer.  As a hypothetical example, I might want to have a mailertable entry:
  120.  
  121. mailsh!mnews    news.cs.niu.edu
  122.  
  123. so that a message addressed to:
  124.  
  125.     'comp.unix.wizards@news.cs.niu.edu, news.groups@news.cs.niu.edu'
  126.  
  127. would result in /bin/sh being called with arguments:
  128.  
  129.     sh -r sender /usr/lib/mailsh/mnews.sh comp.unix.wizards news.groups
  130.  
  131. and the appropriate shell script would be designed to inject this into the
  132. news system cross posted to the two groups.  (Please don't try sending
  133. mail to 'comp.unix.wizards@news.cs.niu.edu' to test this.  It will bounce
  134. with a "host unknown" message.)
  135.  
  136.  
  137.